package com.sanqianke.db;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class FoodDb {
	private static BufferedReader br;
	private static BufferedWriter bw;
	private static List<String> foodList = new ArrayList<String>();
	static{
		try {
			bw = new BufferedWriter(new FileWriter("Food.txt",true));
			br = new BufferedReader(new FileReader("Food.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	

	public static List<String> getFoodList() {
		return foodList;
	}

	public static void setFoodList(List<String> foodList) {
		FoodDb.foodList = foodList;
	}

	public static BufferedReader getBr() {
		return br;
	}

	public static BufferedWriter getBw() {
		return bw;
	}

	public static void setBw(BufferedWriter bw) {
		FoodDb.bw = bw;
	}
	
	

}
